import { createApp } from 'vue'
import App from './App.vue'
// 引入 elementPlus
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
// 引入 Element 国际化配置
import zhCn from 'element-plus/es/locale/lang/zh-cn'
// svg 插件需要的配置代码
import 'virtual:svg-icons-register'
import globalComponent from '@/components/index.ts'
import '@/styles/index.scss'
// 引入模板路由
import router from './router'
import pinia from '@/stores/index.ts'

const app = createApp(App)
// 挂载全局注册组件
app.use(globalComponent)
// 挂载 ElementPlus
app.use(ElementPlus, {
  locale: zhCn, // Element 国际化配置
})
// 注册模板路由
app.use(router)
// 挂在 pinia
app.use(pinia)
app.mount('#app')
